<% var title = '播发系统管理后台' %>
<!DOCTYPE html>
<html>
  <head>
    <title><%= title %></title>
    <link rel="stylesheet" type="text/css" href="/css/font-awesome.css">
    <link rel="stylesheet" type="text/css" href="/css/style.css">
  </head>
  <style type="text/css">
    .container{
        padding-top: 50px;
    }
  </style>
  <body>
    <div class="container">
        <div class="col-xs-12 col-sm-8 col-md-6 col-lg-4 col-center">
            <h1 class="text-center"><%= title %></h1>

            <hr/>

            <form action="/login" method="post" class="form-horizontal" id="form-login">
                <div class="form-group">
                    <strong>管理员登陆</strong>
                </div>
                <div class="form-group">
                    <div class="input-group">
                        <div class="input-group-addon"><i class="fa fa-user"></i></div>
                        <input type="text" class="form-control" name="username" placeholder="用户名">
                    </div>
                </div>
                <div class="form-group">
                    <div class="input-group">
                        <div class="input-group-addon"><i class="fa fa-key"></i></div>
                        <input type="password" class="form-control" name="password" placeholder="密码">
                    </div>
                </div>

                <div class="form-group">
                    <div class="checkbox">
                        <label>
                            <input type="checkbox"> 记住我
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-block btn-lg btn-primary"> 登 陆 </button>
                </div>

                <div class="form-group">
                    <p class="hint"></p>
                </div>
            </form>
        </div>
    </div>


</body>
</html>
<script src="/js/jquery-1.11.3.min.js"></script>

<script>
(function(){
    var $formLogin = $('#form-login');
    var $p = $formLogin.find('.hint');
    var $inputEmail = $('input[name="username"]'),
        $inputPassword = $('input[name="password"]');

    $formLogin.submit(function(event){
        var email = $.trim( $inputEmail.val() );
        var password = $.trim( $inputPassword.val() );

        if (!email) {
            $p.html('请输入您的用户名。');
            $inputEmail.focus();
            return false;
        }

        if (!password) {
            $p.html('请输入您的密码。');
            $inputPassword.focus();
            return false;
        }
    });
})();
</script>